package com.myappengine.model;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

@PersistenceCapable
public class UploadedFile {
	
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key key;
	
	@Persistent
	private String fileName;
	
	@Persistent
	private String mime;
	
	@Persistent
	private Student student;
	
	public UploadedFile() {
		
	}
	
	public UploadedFile(String fileName, String mime) {
		this.fileName = fileName;
		this.mime = mime;
	}
	
	public UploadedFile(String fileName, String mime, Student student) {
		this(fileName, mime);
		this.student = student;
	}

	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	public String getMime() {
		return mime;
	}

	public void setMime(String mime) {
		this.mime = mime;
	}

	public Student getStudent() {
		return student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	public Key getKey() {
		return key;
	}
}
